<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  <title>图解Http六HTTP首部 | 清风向阳</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  
    <meta name="keywords" content="Joker,Joker's Blog" />
  
  <meta name="description" content="HTTP协议的请求和响应报文必定包含HTTP首部，只是我们平时在使用Web的过程中感受不到它">
<meta name="keywords" content="HTTP">
<meta property="og:type" content="article">
<meta property="og:title" content="图解Http六HTTP首部">
<meta property="og:url" content="http://mjjde.github.io/2017/05/06/图解Http六HTTP首部/index.html">
<meta property="og:site_name" content="清风向阳">
<meta property="og:description" content="HTTP协议的请求和响应报文必定包含HTTP首部，只是我们平时在使用Web的过程中感受不到它">
<meta property="og:image" content="http://jokero1o.github.io/images/blog_http_6-1.png">
<meta property="og:image" content="http://jokero1o.github.io/images/blog_http_6-2.png">
<meta property="og:image" content="http://jokero1o.github.io/images/blog_http_6-3.png">
<meta property="og:image" content="http://jokero1o.github.io/images/blog_http_6-4.png">
<meta property="og:image" content="http://jokero1o.github.io/images/blog_http_6-5.png">
<meta property="og:updated_time" content="2017-09-15T06:59:48.000Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="图解Http六HTTP首部">
<meta name="twitter:description" content="HTTP协议的请求和响应报文必定包含HTTP首部，只是我们平时在使用Web的过程中感受不到它">
<meta name="twitter:image" content="http://jokero1o.github.io/images/blog_http_6-1.png">
  
  
    <link rel="icon" href="/favicon_pic.ico">
  
  <link href="//cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
  <link rel="stylesheet" href="/css/style.css">
  <script src="/js/pace.min.js"></script>
  

  
  

</head>

<body>
  <div id="container">
      <header id="header">
    <div id="banner"></div>
    <div id="header-outer">
        <div id="header-menu" class="header-menu-pos animated">
            <div class="header-menu-container">
                <a href="/" class="left">
                    <span class="site-title">Joker&#39;s Blog</span>
                </a>
                <nav id="header-menu-nav" class="right">
                    
                    <a  href="/">
                        <i class="fa fa-home"></i>
                        <span>Home</span>
                    </a>
                    
                    <a  href="/archives">
                        <i class="fa fa-archive"></i>
                        <span>Archives</span>
                    </a>
                    
                    <a  href="/about">
                        <i class="fa fa-user"></i>
                        <span>About</span>
                    </a>
                    
                </nav>
                <a class="mobile-header-menu-button">
                    <i class="fa fa-bars"></i>
                </a>
            </div>
        </div>
        <div id="header-row">
            <div id="logo">
                <a href="/">
                    <img src="/images/avatar.jpg" alt="logo">
                </a>
            </div>
            <div class="header-info">
                <div id="header-title">
                    
                    <h2>
                        Joker&#39;s Blog
                    </h2>
                    
                </div>
                <div id="header-description">
                    
                    <h3>
                        一个认真的技术博客
                    </h3>
                    
                </div>
            </div>
            <nav class="header-nav">
                <div class="social">
                    
                        <a title="Joker"  href="//joker-studio.pub">
                            <i class="fa fa-home fa-2x"></i></a>
                    
                        <a title="Github" target="_blank" href="//github.com/mjjde">
                            <i class="fa fa-github fa-2x"></i></a>
                    
                </div>
            </nav>
        </div>
    </div>
</header>
      <div class="outer">
        <section id="main" class="body-wrap"><article id="post-图解Http六HTTP首部" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-inner">
    
      <header class="article-header">
        
  
    <h1 class="post-title" itemprop="name">
      图解Http六HTTP首部
    </h1>
    <div class="post-title-bar">
      <ul>
          
              <li>
                  <i class="fa fa-book"></i>
                  
                      <a href="/categories/网络技术/">网络技术</a>
                  
              </li>
          
        <li>
          <i class="fa fa-calendar"></i>  2017-05-06
        </li>
        <li>
          <i class="fa fa-eye"></i>
          <span id="busuanzi_value_page_pv"></span>
        </li>
      </ul>
    </div>
  

          
      </header>
    
    <div class="article-entry post-content" itemprop="articleBody">
      
            
            <blockquote>
<p>HTTP协议的请求和响应报文必定包含HTTP首部，只是我们平时在使用Web的过程中感受不到它<br><a id="more"></a></p>
</blockquote>
<h3 id="HTTP首部字段"><a href="#HTTP首部字段" class="headerlink" title="HTTP首部字段"></a>HTTP首部字段</h3><p>HTTP首部字段是客户端和服务端的请求及相应报文中必不可缺的元素之一。它可以传递重要的信息。<br>HTTP首部的格式为<br>字段名:字段值<br>可以同时有多个字段值，使用逗号分开<br>字段名:字段值,字段值</p>
<h3 id="首部预览"><a href="#首部预览" class="headerlink" title="首部预览"></a>首部预览</h3><ol>
<li>常见首部字段<br><img src="http://jokero1o.github.io/images/blog_http_6-1.png" alt=""><br><img src="http://jokero1o.github.io/images/blog_http_6-2.png" alt=""><br><img src="http://jokero1o.github.io/images/blog_http_6-3.png" alt=""><br><img src="http://jokero1o.github.io/images/blog_http_6-4.png" alt=""><br><img src="http://jokero1o.github.io/images/blog_http_6-5.png" alt=""></li>
<li>非HTTP规定的首部字段<br>比如之前提到的Cookie，set-Cookie</li>
<li>End-to-end首部和Hop-by-hop首部<br>端到端首部(End-to-end)分在此类的首部将会作用到最后的接收目标。且必须保存在由缓存生成的响应中，另外规定必须被转发<br>逐跳首部(Hop-by-hop)分在此类别中的首部只对单次的转发有效。在HTTP/1.1和之后的版本需要加上Connection首部字段</li>
</ol>
<h3 id="HTTP-1-1通用首部字段"><a href="#HTTP-1-1通用首部字段" class="headerlink" title="HTTP/1.1通用首部字段"></a>HTTP/1.1通用首部字段</h3><h4 id="Cache-Control"><a href="#Cache-Control" class="headerlink" title="Cache-Control"></a>Cache-Control</h4><p>该指令可以控制缓存的机制</p>
<h5 id="public"><a href="#public" class="headerlink" title="public"></a>public</h5><p>表示其他的用户也可以适合该缓存</p>
<h5 id="private"><a href="#private" class="headerlink" title="private"></a>private</h5><p>表示只提供给特定的用户使用的缓存，其他用户发过来请求，代理服务器不会返回缓存</p>
<h5 id="no-cache"><a href="#no-cache" class="headerlink" title="no-cache"></a>no-cache</h5><p>该指令主要是防止从缓存服务器中返回了过期的资源<br>客户端发送的请求中包含该指令表示代理服务器不能返回缓存，强制要求返回源服务器中的资源<br>服务端响应中包含该指令表示代理服务器不能将缓存保存，代理服务器想源服务器请求缓存有效性也会直接返回无效，如果服务端的响应中的该字段没有具体的值，可以使用缓存。</p>
<h5 id="no-store"><a href="#no-store" class="headerlink" title="no-store"></a>no-store</h5><p>该指令表示缓存不能在本地存储请求或者响应的任何部分</p>
<h5 id="s-maxage"><a href="#s-maxage" class="headerlink" title="s-maxage"></a>s-maxage</h5><p>该指令是针对多用户使用的公共缓存服务器，对单个用户重复返回的服务器来说是无效的。使用该指令后Expires和max-age是无效的</p>
<h5 id="max-age"><a href="#max-age" class="headerlink" title="max-age"></a>max-age</h5><p>该字段出现在客户端表示在max-age规定的时间内可以返回缓存的。<br>该字段出现在服务端表示在max-age规定的时间内不会对缓存的有效性确认。如果值是0，那么缓存服务器就会去源服务器请求。</p>
<h5 id="min-fresh"><a href="#min-fresh" class="headerlink" title="min-fresh"></a>min-fresh</h5><p>该字段表示要求发起请求到缓存服务器返回缓存的时间(新鲜生命期)要小于指定的值</p>
<h5 id="max-stale"><a href="#max-stale" class="headerlink" title="max-stale"></a>max-stale</h5><p>表示即使缓存资源过期了也会接收，如果有具体的值，那么过期了但是在该值内也接收</p>
<h5 id="only-if-cache"><a href="#only-if-cache" class="headerlink" title="only-if-cache"></a>only-if-cache</h5><p>该指标表示客户端要求只有缓存服务器有缓存的情况下才会去返回，如果没有缓存，就返回504</p>
<h5 id="must-revalidate"><a href="#must-revalidate" class="headerlink" title="must-revalidate"></a>must-revalidate</h5><p>该指令要求缓存服务器必须向源服务器确认即将返回的缓存的有效性，如果源服务器没有响应，则返回504，同是max-stale失效</p>
<h5 id="proxy-revalidate"><a href="#proxy-revalidate" class="headerlink" title="proxy-revalidate"></a>proxy-revalidate</h5><p>该指令表示所以的缓存服务器接受到了带改指令的请求，都要向源服务器请求缓存的有效性</p>
<h5 id="no-transform"><a href="#no-transform" class="headerlink" title="no-transform"></a>no-transform</h5><p>该指令表示缓存都不能改变请求或者响应的媒体类型</p>
<h5 id="cache-extension-token"><a href="#cache-extension-token" class="headerlink" title="cache-extension token"></a>cache-extension token</h5><p>该指令可以扩展Cache-Control的指令</p>
<h4 id="Connection"><a href="#Connection" class="headerlink" title="Connection"></a>Connection</h4><ul>
<li>控制不再转发给代理的首部字段</li>
<li>管理持久连接</li>
</ul>
<ol>
<li>控制不再转发给代理的首部字段<br>在客户端发送的请求或者服务端返回的响应使用该字段可以使该字段定义的字段不被转发给其他的代理服务器。Hop-by-hop</li>
<li>管理持久连接<br>HTTP/1.1默认是会持久连接的，使用Close值可以关闭连接，使用keep-alive可以保持连接</li>
</ol>
<h4 id="Date"><a href="#Date" class="headerlink" title="Date"></a>Date</h4><p>该字段表示创建HTTP报文的创建时间</p>
<h4 id="Transfer-Encoding"><a href="#Transfer-Encoding" class="headerlink" title="Transfer-Encoding"></a>Transfer-Encoding</h4><p>该字段表示传输是的报文采用什么编码</p>
<h4 id="Upgrade"><a href="#Upgrade" class="headerlink" title="Upgrade"></a>Upgrade</h4><p>用于检测HTTP协议以及其他协议是否可以使用</p>
<h4 id="Via"><a href="#Via" class="headerlink" title="Via"></a>Via</h4><p>报文在经过代理或者网关是会追加via字段来追踪传输的路径</p>
<h4 id="Warning"><a href="#Warning" class="headerlink" title="Warning"></a>Warning</h4><p>该首部通常会告知用户一些与缓存相关的问题的</p>
<h3 id="请求首部字段"><a href="#请求首部字段" class="headerlink" title="请求首部字段"></a>请求首部字段</h3><p>请求首部字段是指客户端向服务端发送请求是所带的首部</p>
<h4 id="Accept"><a href="#Accept" class="headerlink" title="Accept"></a>Accept</h4><p>该首部表面客户端可接受的媒体类型，且可以使用q来说明权重，服务端会根据权重来优先返回该媒体</p>
<h4 id="Accept-Charset"><a href="#Accept-Charset" class="headerlink" title="Accept-Charset"></a>Accept-Charset</h4><p>该首部用来告诉服务端客户端支持的字符集，可以使用q来说明权重</p>
<h4 id="Accept-Encoding"><a href="#Accept-Encoding" class="headerlink" title="Accept-Encoding"></a>Accept-Encoding</h4><p>该首部用来告诉服务端客户端支持的编码及优先顺序</p>
<h4 id="Accept-Language"><a href="#Accept-Language" class="headerlink" title="Accept-Language"></a>Accept-Language</h4><p>该首部用来告诉服务端客户端所能支持的语言</p>
<h4 id="Authorization"><a href="#Authorization" class="headerlink" title="Authorization"></a>Authorization</h4><p>该首部是用来告诉服务端用户代理的认证的值</p>
<h4 id="Expect"><a href="#Expect" class="headerlink" title="Expect"></a>Expect</h4><p>客户端使用该首部来告知服务端期望做出某些特定的行为</p>
<h4 id="From"><a href="#From" class="headerlink" title="From"></a>From</h4><p>该首部用来告诉服务端使用用户代理的用户电子邮件地址</p>
<h4 id="Host"><a href="#Host" class="headerlink" title="Host"></a>Host</h4><p>该首部可以告知服务端请求的资源所处的互联网主机名和端口号</p>
<h4 id="if-Match"><a href="#if-Match" class="headerlink" title="if-Match"></a>if-Match</h4><p>该首部表示服务端只有在满足条件才可以返回，if-Match的值需要和ETag一致</p>
<h4 id="if-Modified-Since"><a href="#if-Modified-Since" class="headerlink" title="if-Modified-Since"></a>if-Modified-Since</h4><p>该首部告知服务端如果资源更新时间晚于定义的值，则希望处理该请求，如果没有更新，就返回304</p>
<h4 id="if-None-Match"><a href="#if-None-Match" class="headerlink" title="if-None-Match"></a>if-None-Match</h4><p>该首部表示服务端的资源ETag与定义的值不一致才处理请求</p>
<h4 id="if-Range"><a href="#if-Range" class="headerlink" title="if-Range"></a>if-Range</h4><p>该首部告知服务端若指定的值ETag或者时间和请求资源的ETag或时间相一致的话则做范围请求处理</p>
<h4 id="if-Unmodified-Since"><a href="#if-Unmodified-Since" class="headerlink" title="if-Unmodified-Since"></a>if-Unmodified-Since</h4><p>该首部和if-Modified-Since相反</p>
<h4 id="Max-Forwards"><a href="#Max-Forwards" class="headerlink" title="Max-Forwards"></a>Max-Forwards</h4><p>该首部以十进制整数形式指定可经过的服务器个数，一种调试手段</p>
<h4 id="Proxy-Authorization"><a href="#Proxy-Authorization" class="headerlink" title="Proxy-Authorization"></a>Proxy-Authorization</h4><p>该首部是用来当代理服务器发来认证质询时来告知服务器的认证信息</p>
<h4 id="Range"><a href="#Range" class="headerlink" title="Range"></a>Range</h4><p>该首部表示范围请求的请求范围</p>
<h4 id="Referer"><a href="#Referer" class="headerlink" title="Referer"></a>Referer</h4><p>该首部告知服务端请求的原始资源的URI</p>
<h4 id="TE"><a href="#TE" class="headerlink" title="TE"></a>TE</h4><p>该首部告知服务端客户端能够处理响应的传输编码方式和优先级</p>
<h4 id="User-Agent"><a href="#User-Agent" class="headerlink" title="User-Agent"></a>User-Agent</h4><p>该首部会简化创建请求的浏览器和用户代理名称等信息传达给服务端</p>
<h3 id="响应首部字段"><a href="#响应首部字段" class="headerlink" title="响应首部字段"></a>响应首部字段</h3><p>响应首部字段是有服务器想客户端发送响应式使用的首部字段</p>
<h4 id="Accept-Ranges"><a href="#Accept-Ranges" class="headerlink" title="Accept-Ranges"></a>Accept-Ranges</h4><p>该首部告知客户端服务端是否能处理传过来的范围请求，处理成功值为byte，无法处理为none</p>
<h4 id="Age"><a href="#Age" class="headerlink" title="Age"></a>Age</h4><p>该首部告知客户端服务端多久前创建了响应</p>
<h4 id="ETag"><a href="#ETag" class="headerlink" title="ETag"></a>ETag</h4><p>该首部告知客户端实体标识</p>
<h4 id="Location"><a href="#Location" class="headerlink" title="Location"></a>Location</h4><p>该首部告知客户端可能需要根据该值来再次请求资源</p>
<h4 id="Proxy-Authenticate"><a href="#Proxy-Authenticate" class="headerlink" title="Proxy-Authenticate"></a>Proxy-Authenticate</h4><p>该首部会把有代理服务器所要求的认证信息传给客户端</p>
<h4 id="Retry-After"><a href="#Retry-After" class="headerlink" title="Retry-After"></a>Retry-After</h4><p>该首部告知客户端应该在多久之后再次发送请求</p>
<h4 id="Server"><a href="#Server" class="headerlink" title="Server"></a>Server</h4><p>该首部告知客户端当前服务器上安装的HTTP服务器应用信息</p>
<h4 id="Vary"><a href="#Vary" class="headerlink" title="Vary"></a>Vary</h4><p>该首部用来控制代理服务器返回缓存的条件</p>
<h4 id="WWW-Authenticate"><a href="#WWW-Authenticate" class="headerlink" title="WWW-Authenticate"></a>WWW-Authenticate</h4><p>该首部用于HTTP访问认证</p>
<h3 id="实体首部字段"><a href="#实体首部字段" class="headerlink" title="实体首部字段"></a>实体首部字段</h3><p>实体首部字段是包含请求和响应报文中实体部分使用的字段</p>
<h4 id="Allow"><a href="#Allow" class="headerlink" title="Allow"></a>Allow</h4><p>该首部通知客户端能支持的Request-URI指定资源的所有HTTP方法，当服务器接收到不支持的HTTP请求方法，返回405</p>
<h4 id="Content-Encoding"><a href="#Content-Encoding" class="headerlink" title="Content-Encoding"></a>Content-Encoding</h4><p>该首部告知客户端对实体的主体部分选用的内容编码格式</p>
<h4 id="Content-Language"><a href="#Content-Language" class="headerlink" title="Content-Language"></a>Content-Language</h4><p>该首部告知客户端，实体主体使用的自然语言</p>
<h4 id="Content-Length"><a href="#Content-Length" class="headerlink" title="Content-Length"></a>Content-Length</h4><p>该首部表示实体主体部分的大小</p>
<h4 id="Content-Location"><a href="#Content-Location" class="headerlink" title="Content-Location"></a>Content-Location</h4><p>该首部给出报文主体部分的对应的URI，客户端可能会根据URI再次请求资源</p>
<h4 id="Content-MD5"><a href="#Content-MD5" class="headerlink" title="Content-MD5"></a>Content-MD5</h4><p>该首部值数一串MD5算法生成的值，目的是为了保证传输过程中实体数据的完整性</p>
<h4 id="Content-Range"><a href="#Content-Range" class="headerlink" title="Content-Range"></a>Content-Range</h4><p>该首部是针对范围请求是响应使用的首部，表示响应实体的范围</p>
<h4 id="Content-Type"><a href="#Content-Type" class="headerlink" title="Content-Type"></a>Content-Type</h4><p>该首部表示对于的实体内对象的媒体类型</p>
<h4 id="Expires"><a href="#Expires" class="headerlink" title="Expires"></a>Expires</h4><p>该首部会将资源失效的日期告诉给客户端</p>
<h4 id="Last-Modified"><a href="#Last-Modified" class="headerlink" title="Last-Modified"></a>Last-Modified</h4><p>该首部会告知客户端资源最后修改的日期</p>

            <div class="post-copyright">
    <div class="content">
        <p>最后更新： 2017年09月15日 14:59</p>
        <p>原始链接： <a class="post-url" href="/2017/05/06/图解Http六HTTP首部/" title="图解Http六HTTP首部">http://mjjde.github.io/2017/05/06/图解Http六HTTP首部/</a></p>
        <footer>
            <a href="http://mjjde.github.io">
                <img src="/images/avatar.jpg" alt="Joker Mei">
                Joker Mei
            </a>
        </footer>
    </div>
</div>

      
    </div>
    <footer class="article-footer">
        
        
<div class="post-share">
    <a href="javascript:;" id="share-sub" class="post-share-fab">
        <i class="fa fa-share-alt"></i>
    </a>
    <div class="post-share-list" id="share-list">
        <ul class="share-icons">
          <li>
            <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=http://mjjde.github.io/2017/05/06/图解Http六HTTP首部/&title=《图解Http六HTTP首部》 — 清风向阳&pic=http://mjjde.github.ioimages/avatar.jpg" data-title="微博">
              <i class="fa fa-weibo"></i>
            </a>
          </li>
          <li>
            <a class="weixin share-sns" id="wxFab" href="javascript:;" data-title="微信">
              <i class="fa fa-weixin"></i>
            </a>
          </li>
          <li>
            <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=http://mjjde.github.io/2017/05/06/图解Http六HTTP首部/&title=《图解Http六HTTP首部》 — 清风向阳&source=
HTTP协议的请求和响应报文必定包含HTTP首部，只是我们平时在使用Web的过程中感受不到它" data-title="QQ">
              <i class="fa fa-qq"></i>
            </a>
          </li>
          <li>
            <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=http://mjjde.github.io/2017/05/06/图解Http六HTTP首部/" data-title="Facebook">
              <i class="fa fa-facebook"></i>
            </a>
          </li>
          <li>
            <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=《图解Http六HTTP首部》 — 清风向阳&url=http://mjjde.github.io/2017/05/06/图解Http六HTTP首部/&via=http://mjjde.github.io" data-title="Twitter">
              <i class="fa fa-twitter"></i>
            </a>
          </li>
          <li>
            <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=http://mjjde.github.io/2017/05/06/图解Http六HTTP首部/" data-title="Google+">
              <i class="fa fa-google-plus"></i>
            </a>
          </li>
        </ul>
     </div>
</div>
<div class="post-modal wx-share" id="wxShare">
    <a class="close" href="javascript:;" id="wxShare-close">×</a>
    <p>扫一扫，分享到微信</p>
    <img src="//api.qrserver.com/v1/create-qr-code/?data=http://mjjde.github.io/2017/05/06/图解Http六HTTP首部/" alt="微信分享二维码">
</div>

<div class="mask"></div>

        
        <ul class="article-footer-menu">
            
            
  <li class="article-footer-tags">
    <i class="fa fa-tags"></i>
      
    <a href="/tags/HTTP/" class="color5">HTTP</a>
      
  </li>

        </ul>
        
    </footer>
  </div>
</article>


    <aside class="post-toc-pos post-toc-top" id="post-toc">
        <nav class="post-toc-wrap">
            <ol class="post-toc"><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#HTTP首部字段"><span class="post-toc-text">HTTP首部字段</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#首部预览"><span class="post-toc-text">首部预览</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#HTTP-1-1通用首部字段"><span class="post-toc-text">HTTP/1.1通用首部字段</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#Cache-Control"><span class="post-toc-text">Cache-Control</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-5"><a class="post-toc-link" href="#public"><span class="post-toc-text">public</span></a></li><li class="post-toc-item post-toc-level-5"><a class="post-toc-link" href="#private"><span class="post-toc-text">private</span></a></li><li class="post-toc-item post-toc-level-5"><a class="post-toc-link" href="#no-cache"><span class="post-toc-text">no-cache</span></a></li><li class="post-toc-item post-toc-level-5"><a class="post-toc-link" href="#no-store"><span class="post-toc-text">no-store</span></a></li><li class="post-toc-item post-toc-level-5"><a class="post-toc-link" href="#s-maxage"><span class="post-toc-text">s-maxage</span></a></li><li class="post-toc-item post-toc-level-5"><a class="post-toc-link" href="#max-age"><span class="post-toc-text">max-age</span></a></li><li class="post-toc-item post-toc-level-5"><a class="post-toc-link" href="#min-fresh"><span class="post-toc-text">min-fresh</span></a></li><li class="post-toc-item post-toc-level-5"><a class="post-toc-link" href="#max-stale"><span class="post-toc-text">max-stale</span></a></li><li class="post-toc-item post-toc-level-5"><a class="post-toc-link" href="#only-if-cache"><span class="post-toc-text">only-if-cache</span></a></li><li class="post-toc-item post-toc-level-5"><a class="post-toc-link" href="#must-revalidate"><span class="post-toc-text">must-revalidate</span></a></li><li class="post-toc-item post-toc-level-5"><a class="post-toc-link" href="#proxy-revalidate"><span class="post-toc-text">proxy-revalidate</span></a></li><li class="post-toc-item post-toc-level-5"><a class="post-toc-link" href="#no-transform"><span class="post-toc-text">no-transform</span></a></li><li class="post-toc-item post-toc-level-5"><a class="post-toc-link" href="#cache-extension-token"><span class="post-toc-text">cache-extension token</span></a></li></ol></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#Connection"><span class="post-toc-text">Connection</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#Date"><span class="post-toc-text">Date</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#Transfer-Encoding"><span class="post-toc-text">Transfer-Encoding</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#Upgrade"><span class="post-toc-text">Upgrade</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#Via"><span class="post-toc-text">Via</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#Warning"><span class="post-toc-text">Warning</span></a></li></ol></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#请求首部字段"><span class="post-toc-text">请求首部字段</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#Accept"><span class="post-toc-text">Accept</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#Accept-Charset"><span class="post-toc-text">Accept-Charset</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#Accept-Encoding"><span class="post-toc-text">Accept-Encoding</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#Accept-Language"><span class="post-toc-text">Accept-Language</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#Authorization"><span class="post-toc-text">Authorization</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#Expect"><span class="post-toc-text">Expect</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#From"><span class="post-toc-text">From</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#Host"><span class="post-toc-text">Host</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#if-Match"><span class="post-toc-text">if-Match</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#if-Modified-Since"><span class="post-toc-text">if-Modified-Since</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#if-None-Match"><span class="post-toc-text">if-None-Match</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#if-Range"><span class="post-toc-text">if-Range</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#if-Unmodified-Since"><span class="post-toc-text">if-Unmodified-Since</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#Max-Forwards"><span class="post-toc-text">Max-Forwards</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#Proxy-Authorization"><span class="post-toc-text">Proxy-Authorization</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#Range"><span class="post-toc-text">Range</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#Referer"><span class="post-toc-text">Referer</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#TE"><span class="post-toc-text">TE</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#User-Agent"><span class="post-toc-text">User-Agent</span></a></li></ol></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#响应首部字段"><span class="post-toc-text">响应首部字段</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#Accept-Ranges"><span class="post-toc-text">Accept-Ranges</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#Age"><span class="post-toc-text">Age</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#ETag"><span class="post-toc-text">ETag</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#Location"><span class="post-toc-text">Location</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#Proxy-Authenticate"><span class="post-toc-text">Proxy-Authenticate</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#Retry-After"><span class="post-toc-text">Retry-After</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#Server"><span class="post-toc-text">Server</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#Vary"><span class="post-toc-text">Vary</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#WWW-Authenticate"><span class="post-toc-text">WWW-Authenticate</span></a></li></ol></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#实体首部字段"><span class="post-toc-text">实体首部字段</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#Allow"><span class="post-toc-text">Allow</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#Content-Encoding"><span class="post-toc-text">Content-Encoding</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#Content-Language"><span class="post-toc-text">Content-Language</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#Content-Length"><span class="post-toc-text">Content-Length</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#Content-Location"><span class="post-toc-text">Content-Location</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#Content-MD5"><span class="post-toc-text">Content-MD5</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#Content-Range"><span class="post-toc-text">Content-Range</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#Content-Type"><span class="post-toc-text">Content-Type</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#Expires"><span class="post-toc-text">Expires</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#Last-Modified"><span class="post-toc-text">Last-Modified</span></a></li></ol></li></ol>
        </nav>
    </aside>
    

<nav id="article-nav">
  
    <a href="/2017/06/09/图解HTTP七确保Web安全的HTTPS/" id="article-nav-newer" class="article-nav-link-wrap">

      <span class="article-nav-title">
        <i class="fa fa-hand-o-left" aria-hidden="true"></i>
        
          图解HTTP七确保Web安全的HTTPS
        
      </span>
    </a>
  
  
    <a href="/2017/05/05/图解Http五与HTTP协作的Web服务器/" id="article-nav-older" class="article-nav-link-wrap">
      <span class="article-nav-title">图解Http五与HTTP协作的Web服务器</span>
      <i class="fa fa-hand-o-right" aria-hidden="true"></i>
    </a>
  
</nav>



    
</section>
        
      </div>
      <footer id="footer">
  <div class="outer">
    <div id="footer-info" class="inner">
      
<p>
    <span id="busuanzi_container_site_uv" style='display:none'>
        总访客数：<span id="busuanzi_value_site_uv"></span>
    </span>
    <span id="busuanzi_container_site_pv" style='display:none'>
        总访问量：<span id="busuanzi_value_site_pv"></span>
    </span>
</p>


      <p>
        Powered by  <a href="http://hexo.io/" target="_blank">Hexo</a>
        Theme <a href="//github.com/wongminho/hexo-theme-miho" target="_blank">MiHo</a>
      &copy; 2018 Joker Mei<br>
      </p>
    </div>
  </div>
</footer>
    <script async src="//dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<script src="//cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
<script>
  var mihoConfig = {
      root: "http://mjjde.github.io",
      animate: false,
      isHome: false,
      share: true
  }
</script>
<div class="sidebar">
    <!-- <div id="sidebar-search" title="Search">
        <i class="fa fa-search"></i>
    </div> -->
    <div id="sidebar-category" title="Categories">
        <i class="fa fa-book"></i>
    </div>
    <div id="sidebar-tag" title="Tags">
        <i class="fa fa-tags"></i>
    </div>
    <div id="sidebar-top">
        <span class="sidebar-top-icon"><i class="fa fa-angle-up"></i></span>
    </div>
</div>
<div class="sidebar-menu-box" id="sidebar-menu-box">
    <div class="sidebar-menu-box-container">
        <div id="sidebar-menu-box-categories">
            <a class="category-link" href="/categories/Android技术/">Android技术</a><a class="category-link" href="/categories/其他技术/">其他技术</a><a class="category-link" href="/categories/网络技术/">网络技术</a><a class="category-link" href="/categories/设计模式/">设计模式</a>
        </div>
        <div id="sidebar-menu-box-tags">
            <a href="/tags/Activity/" style="font-size: 10px;">Activity</a> <a href="/tags/Android/" style="font-size: 16px;">Android</a> <a href="/tags/Android-IPC/" style="font-size: 10px;">Android-IPC</a> <a href="/tags/Binder/" style="font-size: 16px;">Binder</a> <a href="/tags/DiskLruCache/" style="font-size: 10px;">DiskLruCache</a> <a href="/tags/Fragment/" style="font-size: 10px;">Fragment</a> <a href="/tags/HTTP/" style="font-size: 20px;">HTTP</a> <a href="/tags/Java/" style="font-size: 10px;">Java</a> <a href="/tags/Notification/" style="font-size: 10px;">Notification</a> <a href="/tags/RemoteView/" style="font-size: 10px;">RemoteView</a> <a href="/tags/Rxjava/" style="font-size: 14px;">Rxjava</a> <a href="/tags/ServiceManager/" style="font-size: 14px;">ServiceManager</a> <a href="/tags/android/" style="font-size: 12px;">android</a> <a href="/tags/gradle/" style="font-size: 10px;">gradle</a> <a href="/tags/java/" style="font-size: 18px;">java</a> <a href="/tags/other/" style="font-size: 10px;">other</a> <a href="/tags/volley/" style="font-size: 12px;">volley</a> <a href="/tags/widget/" style="font-size: 10px;">widget</a> <a href="/tags/事件/" style="font-size: 10px;">事件</a> <a href="/tags/组件化/" style="font-size: 10px;">组件化</a> <a href="/tags/设计模式/" style="font-size: 18px;">设计模式</a>
        </div>
    </div>
    <a href="javascript:;" class="sidebar-menu-box-close">&times;</a>
</div>
<div class="mobile-header-menu-nav" id="mobile-header-menu-nav">
    <div id="mobile-header-menu-container">
        <span class="title">Menu</span>
        <ul class="mobile-header-menu-navbar">
            
            <li>
                <a  href="/">
                    <i class="fa fa-home"></i><span>Home</span>
                </a>
            </li>
            
            <li>
                <a  href="/archives">
                    <i class="fa fa-archive"></i><span>Archives</span>
                </a>
            </li>
            
            <li>
                <a  href="/about">
                    <i class="fa fa-user"></i><span>About</span>
                </a>
            </li>
            
        </ul>
    </div>
</div>
<div class="search-wrap">
    <span class="search-close">&times;</span>
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="back">
            <i class="icon icon-lg icon-chevron-left"></i>
        </a>
        <input class="search-field" placeholder="Search..." id="keywords">
        <a id="search-submit" href="javascript:;">
            <i class="fa fa-search"></i>
        </a>
    <div class="search-container" id="search-container">
        <ul class="search-result" id="search-result">
        </ul>
    </div>
</div>

<div id="search-tpl">
    <li class="search-result-item">
        <a href="{url}" class="search-item-li">
            <span class="search-item-li-title" title="{title}">{title}</span>
        </a>
    </li>
</div>
<script src="/js/search.js"></script>
<script src="/js/main.js"></script>








  </div>
</body>
</html>